package sv.gob.mh.dgii.model;

// Generated Aug 12, 2008 10:12:21 AM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * EdRubroConceptualExpr generated by hbm2java
 */
@Entity
@Table(name = "ED_RUBRO_CONCEPTUAL_EXPR", schema = "EDADEPUDOC")
public class EdRubroConceptualExpr implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3855124901398983747L;
	
	private EdRubroConceptualExprId id;
	private EdRubroConceptual edRubroConceptual;
	private TbFormulariosCampos tbFormulariosCampos;
	private String sprefijo;
	private String ssufijo;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;

	public EdRubroConceptualExpr() {
	}

	public EdRubroConceptualExpr(EdRubroConceptualExprId id,
			EdRubroConceptual edRubroConceptual,
			TbFormulariosCampos tbFormulariosCampos) {
		this.id = id;
		this.edRubroConceptual = edRubroConceptual;
		this.tbFormulariosCampos = tbFormulariosCampos;
	}

	public EdRubroConceptualExpr(EdRubroConceptualExprId id,
			EdRubroConceptual edRubroConceptual,
			TbFormulariosCampos tbFormulariosCampos, String sprefijo,
			String ssufijo, String cusuario, Date fhingreso, Date fhmodificacion) {
		this.id = id;
		this.edRubroConceptual = edRubroConceptual;
		this.tbFormulariosCampos = tbFormulariosCampos;
		this.sprefijo = sprefijo;
		this.ssufijo = ssufijo;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nrubroConceptual", column = @Column(name = "N_RUBRO_CONCEPTUAL", nullable = false, precision = 4, scale = 0)),
			@AttributeOverride(name = "norden", column = @Column(name = "N_ORDEN", nullable = false, precision = 1, scale = 0)) })
	public EdRubroConceptualExprId getId() {
		return this.id;
	}

	public void setId(EdRubroConceptualExprId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "N_RUBRO_CONCEPTUAL", nullable = false, insertable = false, updatable = false)
	public EdRubroConceptual getEdRubroConceptual() {
		return this.edRubroConceptual;
	}

	public void setEdRubroConceptual(EdRubroConceptual edRubroConceptual) {
		this.edRubroConceptual = edRubroConceptual;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "C_FORMULARIO", referencedColumnName = "C_FORMULARIO", nullable = false),
			@JoinColumn(name = "C_VERSION", referencedColumnName = "C_VERSION", nullable = false),
			@JoinColumn(name = "C_CAMPO", referencedColumnName = "C_CAMPO", nullable = false) })
	public TbFormulariosCampos getTbFormulariosCampos() {
		return this.tbFormulariosCampos;
	}

	public void setTbFormulariosCampos(TbFormulariosCampos tbFormulariosCampos) {
		this.tbFormulariosCampos = tbFormulariosCampos;
	}

	@Column(name = "S_PREFIJO", length = 20)
	public String getSprefijo() {
		return this.sprefijo;
	}

	public void setSprefijo(String sprefijo) {
		this.sprefijo = sprefijo;
	}

	@Column(name = "S_SUFIJO", length = 20)
	public String getSsufijo() {
		return this.ssufijo;
	}

	public void setSsufijo(String ssufijo) {
		this.ssufijo = ssufijo;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_MODIFICACION", length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

}
